package com.cq.hd.common.constant;

/**
 * @description: Redis Key Constant Key强制简短
 * @author: mYunYu
 * @date: 2021/7/7 17:17
 * @version: v1.0
 */
public class RedisKeyConstant {

    /**
     * 管理后台用户登陆验证密钥
     * admin:loginKey:#{adminUserId}
     */
    public static final String ADMIN_USER_LOGIN_KEY = "u:admin:loginKey:%s";

    /**
     * 商户登陆验证密钥
     * merchant:loginKey:#{merchantId}
     */
    public static final String MERCHANT_LOGIN_KEY = "u:merchant:loginKey:%s";

    /**
     * 商户详细信息
     * merchant:info:#{merchantId}
     */
    public static final String MERCHANT_INFO_KEY = "u:merchant:info:%s";

    /**
     * 存储商户mobile对应的userId
     * merchant:mobile:#{mobile}
     */
    public static final String MERCHANT_MOBILE_KEY = "u:merchant:mobile:%s";

    /**
     * 用户登陆验证密钥
     * user:loginKey:#{userId}
     */
    public static final String USER_LOGIN_KEY = "u:loginKey:%s";

    /**
     * 用户详细信息
     * user:info:#{userId}
     */
    public static final String USER_INFO_KEY = "u:info:%s";

    /**
     * 存储用户mobile对应的userId
     * user:mobile:#{mobile}
     */
    public static final String USER_MOBILE_KEY = "u:mobile:%s";


    /**
     * 验证码发送次数存储key前缀 sms:count:#{phone}
     */
    public static final String SMS_SEND_COUNT_PREFIX_KEY = "sms:send:count:%s";

    /**
     * 验证码存储key前缀 sms:#{phone}:#{key}
     */
    public static final String SMS_PREFIX_KEY = "sms:%s:%s";

    /**
     * 记录mq消息被Nack的次数
     * #{appId}:#{spId}:mq:nack:count:{mqMsgId}
     */
    public static final String MQ_NACK_COUNT_KEY = "%s:mq:nack:count:%s";

    /**
     * 记录微信用户信息
     */
    public static final String REGISTER_WX_OPEN_ID_KEY = "r:wxOpenId:%s";

    /**
     * 小程序的apiToken
     */
    public static final String MINI_TOKEN_KEY = "mini:token:%s";

    /**
     * 小程序码
     */
    public static final String MINI_CODE_IMG_KEY = "mini:codeImg:%s";

    public static final String MERCHANT_WX_OPEN_ID_KEY = "m:wxOpenId:%s";

    public static final String HF_WX_OPEN_RESULT_KEY = "hf:wxOpenResult:%s";

    /**
     * 今日提现次数
     * withdrawal-day-num:#{type}:#{date}:#{userId}
     */
    public static final String WITHDRAWAL_DAY_NUM_KEY = "withdrawal-day-num:%s:%s:%s";


    /**
     * 微信公众号的apiToken
     */
    public static final String WX_PUB_TOKEN_KEY = "wxPub:token:%s";

    /**
     * 关注微信公众号的用户
     */
    public static final String WX_PUB_SUBSCRIBE_KEY = "wxPub:subscribe";

    /**
     * 微信公众号的订阅二维码
     */
    public static final String WX_PUB_QR_CODE_KEY = "wxPub:qrCode:%s";

}
